import Vue from 'vue'
import App from './App.vue'
import router from './router'
import './plugins/element.js'
//导入全局样式
import './assets/css/global.css'
//导入字体图标
import './assets/fonts/iconfont.css'

import axios from 'axios'

axios.defaults.baseURL = 'https://www.liulongbin.top:8888/api/private/v1/'
axios.interceptors.request.use(config => {
    // Do something before request is sent
    config.headers.Authorization = window.sessionStorage.getItem('token')
    console.log(config)
    return config;
}, error => {
    // Do something with request error
    return Promise.reject(error);
});
Vue.prototype.$http = axios;
Vue.config.productionTip = false

new Vue({
    router,
    render: h => h(App)
}).$mount('#app')